package mobile.dominio;

import waba.io.DataStream;

public class Palm {
	private int id;
	private String descripcion;
	
	public Palm() {

	}

	public Palm(DataStream ds){      
		this.id = ds.readInt();
		this.descripcion = ds.readString();
	}
	
	public void saveTo(DataStream ds){
		ds.writeInt(this.id);
		ds.writeString(this.descripcion);
	}

	public Palm(String descripcion) {
		this.descripcion = descripcion;
	}

	public String getDescripcion() {
		return descripcion;
	}
	
	public void setDescripcion(String descripcion) {
		this.descripcion = descripcion;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public boolean equals(Object arg0) {
		// TODO Auto-generated method stub
		Palm unVehiculo = (Palm)arg0;
		if (unVehiculo.getId() == this.id){
			return true;
		}else{
			return false;
		}
	}

	public String toString() {
		return this.descripcion;
	}
}
